package org.vshe.improve.hibernate.recipes;

import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class SessionManager {
	private static SessionFactory factoryInstance;

	public static SessionFactory getSessionFactory() {
		if (factoryInstance == null) {
			factoryInstance = new Configuration().configure()
					.buildSessionFactory();
		}
		
		return factoryInstance;
	}
}
